import 'dart:async';

// 等待流控制器
class WaittingStreamController {
  final StreamController<List<int>> streamController;
  final DateTime createTime;
  final Duration timeout; // 超时时间

  bool isTimedOut() {
    return DateTime.now().difference(createTime) > timeout;
  }

  WaittingStreamController(
      this.streamController, this.createTime, this.timeout);
}
